package com.cskaoyan.controller;

import com.cskaoyan.bean.BaseRespVo;
import com.cskaoyan.bean.User;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @author stone
 * @date 2022/11/15 21:26
 */
@RestController
@RequestMapping("user")
public class JsonController {

    @PostMapping("login")
    public BaseRespVo login(@RequestBody String value) {
        System.out.println(value);
        return BaseRespVo.ok();
    }
    @PostMapping("login2")
    public BaseRespVo login2(@RequestBody User user) {
        return BaseRespVo.ok(user);
    }
    @PostMapping("login3")
    public BaseRespVo login3(@RequestBody Map map) {
        return BaseRespVo.ok(map);
    }
}
